Don't ignore native CROSSING_GRAB/UNGRAB events
authorAlexander Larsson <alexl@redhat.com>
Mon, 26 Jan 2009 19:50:56 +0000 (20:50 +0100)
committerAlexander Larsson <alex@localhost.localdomain>
Thu, 2 Apr 2009 08:15:27 +0000 (10:15 +0200)
These are sent when someone else grabs the pointer, and we don't
want to miss these expose events. For instance, we missed enter
and leave events on alt-tab.

There were some issues with these wrt out-of-sync grab information
in the client, but that should now be handled. So, it should work
or at least be fixable if we find some bug.

gdk/gdkwindow.c

index 6e96be9d364c28ae51ea2445fe6d8ae9607de1a3..2188c27dd441692dfe035a9b49365474c2b4da5e 100644 (file)
@@ -8510,32 +8510,6 @@ _gdk_windowing_got_event (GdkDisplay *display,
       return;
     }
 
-  if ((event->type == GDK_ENTER_NOTIFY ||
-       event->type == GDK_LEAVE_NOTIFY) &&
-      (event->crossing.mode == GDK_CROSSING_GRAB ||
-       event->crossing.mode == GDK_CROSSING_UNGRAB))
-    {
-      /* We synthesize all crossing events due to grabs are synthesized,
-       * so we ignore the native ones. This is partly to get easier non-X
-       * portability, and because of problems with race conditions due to
-       * the cached state in the client and the real state in the xserver
-       * when grabbing.
-       */
-
-      /* We ended up in this window after some (perhaps other clients)
-        grab, so update the toplevel_under_window state */
-      if (event->type == GDK_ENTER_NOTIFY &&
-         event->crossing.mode == GDK_CROSSING_UNGRAB)
-       {
-         if (display->pointer_info.toplevel_under_pointer)
-           g_object_unref (display->pointer_info.toplevel_under_pointer);
-         display->pointer_info.toplevel_under_pointer = g_object_ref (event_window);
-       }
-      
-      unlink_event = TRUE;
-      goto out;
-    }
-  
   /* Store last pointer window and position/state */
   if (event->type == GDK_ENTER_NOTIFY &&
       event->crossing.detail != GDK_NOTIFY_INFERIOR)